﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_photolist.aspx.cs"
    Inherits="Master_Admin_photolist" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <script language="javascript" src="../Script/formValidator/jquery_last.js" ></script>
    <script src="../Script/public.js" type="text/javascript"></script>
    <link href="Css/Css.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="Form1" runat="server">
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
        <tr>
            <td colspan="2" align="center" class="title">
                <strong>图 片 分 类 管 理</strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="70" height="30">
                <strong>管理导航：</strong>
            </td>
            <td height="30">
                <a href="Admin_photoClassAdd.aspx">添加分类</a>&nbsp;|&nbsp;<a href="Admin_photoClass.aspx">所有分类</a>&nbsp;|&nbsp;<a
                    href="Admin_photoAdd.aspx">添加图片</a>&nbsp;|<a href="Admin_photolist.aspx?Action=my">我添加的图片</a>&nbsp;|&nbsp;<a
                        href="Admin_photolist.aspx">所有图片</a>&nbsp;|&nbsp;<a href="Admin_photolist.aspx?Action=check">审核图片</a>
            </td>
        </tr>
    </table>
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
        <tr>
            <td colspan="2" align="left" class="title">
                <%=GetClassNameAll()%>
            </td>
        </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
        <tr class="title">
             <td height="30" align="center">
                选中
            </td>
            <td height="30" align="center">
                图片名称
            </td>
            <td height="30" align="center">
                分类名称
            </td>
            <td height="30" align="center">
                缩略图
            </td>
            <td height="30" align="center">
                上传用户
            </td>
            <td height="30" align="center">
                审核
            </td>
            <td height="30" align="center">
                操作
            </td>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" 
            OnItemCommand="Repeater1_ItemCommand" onitemdatabound="Repeater1_ItemDataBound">
            <ItemTemplate>
                <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#cccccc'"
                    style="padding: 0px 2px;">
                    <td height="30" align="center">
                        <input type="checkbox" id="photoID" name="photoID" value="<%#Eval("id") %>" />
                    </td>
                    
                    <td height="30" align="center">
                        <%#Eval("PhotoName") %>
                    </td>
                    <td align="center">
                        <%#GetClassName(Eval("ClassId").ToString()) %>
                    </td>
                    <td align="center">
                       <a href="<%#configInfo.InstallDir + Eval("PhotoUrl")%>" target="_blank" ><img border="0" src="<%#configInfo.InstallDir + Eval("PhotoUrl")%>" onload="javascript:DrawImage(this,100,100);" /></a>
                    </td>
                    <td align="center">
                        <%#(Eval("CreateID").ToString()=="0")?"管理员":U.GetModel(AspNetCs.Common.StringHelper.isNumber_int(Eval("CreateID").ToString())).UserName %>
                    </td>
                    <td align="center">
                        <%#Eval("Ischeck").ToString()=="1"?"已审核":"未审核" %>
                    </td>
                    <td align="center">
                     <a href="Admin_photoAdd.aspx?Action=Modify&id=<%#Eval("id") %>" >修改</a>&nbsp;
                        <asp:LinkButton CommandArgument='<%#Eval("id") %>' ID="LinkButton1" runat="server">审核</asp:LinkButton> &nbsp;<asp:LinkButton CommandArgument='<%#Eval("id") %>' OnClientClick="return confirm('是否真的删除？一旦删除将无法恢复!')"  CommandName="Delinfo" ID="LinkButton2" runat="server">删除</asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <asp:Panel ID="pl_nothing" runat="server" Visible="false">
                    <tr  class="tdbg">
                        <td colspan="8" align="center" >
                        <br /><br />
                            暂时没有任何图片数据<br /><br />
                        </td>
                    </tr>
                </asp:Panel>
            </FooterTemplate>
        </asp:Repeater>
        <tr class="tdbg">
            <td colspan="7" height="25" align="right">
                    <table width="100%">
                    <tr><td>
    <input type="checkbox" name="checkedAll" id="checkedAll" onclick="checkBoxAll('photoID')" />全选/取消&nbsp;&nbsp;&nbsp;<asp:LinkButton 
            ID="LinkButton1"  CommandName="deleteAll"    
            OnClientClick="javascript:return confirm('是否真的删除选中的调查信息???\n\n一旦删除将无法恢复!')"  
            runat="server" oncommand="LinkButton1_Command"><span style='color:Red;'>删除选中信息</span></asp:LinkButton>
    &nbsp;
<asp:LinkButton 
            ID="LinkButton3"  CommandName="checkAll"  runat="server" onclick="LinkButton3_Click"><span style='color:Red;'>审核选中信息</span></asp:LinkButton>    
    
            </td>
            <td>
            
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
                    CurrentPageButtonPosition="Beginning" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                    LayoutType="Table" NumericButtonTextFormatString="[{0}]" PageIndexBoxType="DropDownList"
                    PageSize="15" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                    TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" UrlPaging="True" AlwaysShow="True">
                </webdiyer:AspNetPager>
                </td></tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
